/*******************************************
 * Copyright 2007 Aphrodite Framework for javaME .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * Email : owner@aphroditeme.dev.java.net
 * Contributors:
 *     Kent Elton - initial API and implementation
 *******************************************/

package com.aphrodite.ui.bg;

import javax.microedition.lcdui.Graphics;

/**
 * A simple color background
 * 
 * @author kentelt
 * 
 */
public final class ColorBackground extends Background {

	private int bgColor;

	// public ColorBackground(int x, int y, int width, int height, int color,
	// boolean isWidget) {
	// // super(x, y, width, height, isWidget);
	// super();
	// this.bgColor = color;
	// }

	/**
	 * Used in the construction of widget backgrounds
	 * 
	 * @param Color
	 */
	public ColorBackground(int Color) {
		// super(0, 0, 0, 0, true);
		super();
		this.bgColor = Color;
	}

	public void render(Graphics g) {
		g.setColor(bgColor);
		g.fillRect(x, y, width, height);

	}

}
